class1 = {1:'zhangsan', 2:'lisi', 3:'wangwu',4:'lisi'}
print(type(class1))

keys = class1.keys()
print(type(keys))
for key in keys:
    print(class1[key])

for key in class1:
    print(type(key))
    print(class1[key])

items = class1.items()    
print(type(item))
for item in items:
    print(item[0],item[1])


values = class1.values()
print(values)    

def traverse(pdict):
    print('there are {} students in this class'.format(len(pdict)))
    for item in pdict.items():
        print(item[0],item[1])
    return 0